1. Field of the Invention
The present invention relates to a filter for applying dilation and/or erosion operations of mathematical morphology using a W.times.H rectangular structuring element to a two-dimensional matrix of discrete values, the width of the matrix being x and the height being y,
the filter comprising a horizontal portion for applying said dilation or erosion operation to a W.times.1 local neighbourhood and a vertical portion for applying said dilation or erosion operation to a 1.times.H local neighbourhood, PA1 whereby the portions are connected one after the other and the matrix elements are applied serially to the first portion, the output of one portion being connected to the input of the other portion, PA1 wherein the portions comprise a multiplicity of delay means, each providing an equal delay, and a multiplicity of comparing means for comparing two input values and producing the lesser or greater of these values at their output, in the cases of erosion and dilation respectively, PA1 wherein each portion comprises a set of identical operator elements connected one after another, the horizontal portion comprising W such operator elements, and the vertical portion comprising H such operator elements. PA1 the input of the horizontal portion being connected to the first input of the comparing means of the first operator element and also to the second input of the comparing means of each operator element in the the horizontal portion, the output of the Wth operator element forming the output of the horizontal portion, PA1 the said vertical portion further comprising H delay lines each comprising X+1 further delay means connected one after another, the input of the vertical portion being connected to both first and second inputs of the comparing means of the first operator element of the vertical portion and also to the input of the first of the delay lines, the output of each delay line being connected both to the second input of the comparing means of the following operator element and to the input of the following delay line, and the output of the Hth operator element forming the output of the vertical portion.
2. Description of Related Art
Mathematical morphology is a formal method of shape representation and analysis. Basic operations thereof are erosion and dilation, by chaining of which in a suitable manner it is possible to provide, e.g., effective and usable image processing methods. For instance, many applications of computer vision, such as pattern recognition, are based on the use of morphological operators.
In mathematical morphology, the basic operations process the image by means of so-called structuring elements. A structuring element is a neighbourhood in which an operator is effective. In gray-scale morphology, dilation stands for the maximum of the local neighbourhood defined by the structuring element and erosion stands for the minimum, respectively.
Basic data to be processed has been arranged in the form of a matrix, in which each line comprises x samples and the total number of lines is y. In the following example, the dilation and erosion operations for basic data of the size of x=6 and y=6 are examined. The local neighbourhood is rectangular with the dimensions W=3 and H=3, where W is a horizontal and H a vertical dimension.
TABLE 1 ______________________________________ Erosion and dilation operations performed on basic data in neighbourhood 3*3 ______________________________________ ##STR1## ##STR2## ______________________________________
Traditionally, operators are realized by means of the structure of FIG. 1. It comprises delay means D connected one after another to form horizontal lines, each line comprising W delay means, which lines, H in number, are chained one after another in such a way that between each horizontal line is connected a delay line, the length of which is X-W) times the delay of one delay means D. In this structure, a processing means has to be connected to each delay means D of each horizontal line, whereby the processing means has to compare W.times.H values with each other to find the minimum/maximum value desired. Thus the processing means will be quite complicated and therefore also slow. An image processing unit realized in this manner in principle is disclosed, e.g., by U.S. patent specification No. 4,692,943.
A filter defined in the opening paragraph can be formed on the basis of information given in NONLINEAR IMAGE PROCESSING, vol. 1247, 15 Feb 1990, Santa Clara, Calif., pages 145-156; A.C.P. LOUI et al.: "High-speed architectures for morphological image processing". This reference shows a serial combination of a number of identical elements to form dilation and/or erosion processors and gives the teaching that a two-dimensional dilation/erosion operation can be accomplished by coupling serially a horizontal and a vertical portion. The elements used for the dilation and/or erosion processors include, however, several components and the serial combinations formed thereby are slow in operation.